

module.exports = function (enviroment) {
    //enviroment 就是package.json中的命令行的设置的参数
    let isDev;
    let env;
    if(enviroment.development){
        env = 'dev';
        isDev = enviroment.development
    } else {
        env = 'prod';
        isDev = false
    }
    console.log('=====   webpack.config.js    =====',env,isDev,enviroment)
    // 根据环境参数动态决定引入对应配置文件
    return require(`./config/webpack.${env}.js`)({
        dirname: __dirname,
        isDev,
    });
};
